const HISTORY_KEY = 'history_list'
export const setItem = (obj) => {
  localStorage.setItem('info', JSON.stringify(obj))
}
export const getItem = () => {
  return (
    JSON.parse(localStorage.getItem('info')) || {
      token: '',
      userid: ''
    }
  )
}
export const removeItem = () => {
  localStorage.removeItem('info')
}
export const setHistoryList = (arr) => {
  localStorage.setItem(HISTORY_KEY, JSON.stringify(arr))
}
export const getHistoryList = () => {
  return JSON.parse(localStorage.getItem(HISTORY_KEY)) || []
}
